" helper functions for lxsplit split {{{1
function! BetterLxsplitSplitFunction()
  " wrapping is evil
  set nowrap
  " remove everything but file lines
  v/^-/d
  " remove excessive ls information
  g/./normal 8daW
  " prepend lxsplit command
  g/./normal Ilxsplit -s "
  " complete quotation mark and leave a space
  g/./normal A" jl
  " fetch SPLIT_FILE_SIZE from env
  g/./r!echo $SPLIT_FILE_SIZE
  " join because the previous r! opens a new line
  g/lxsplit -/normal J
  " output
  write! /tmp/vim-gen-betterlxsplitsplit.fish
  " quit
  q!
endfunction

" helper functions for lxsplit join {{{1
function! BetterLxsplitJoinFunction()
  " wrapping is evil
  set nowrap
  " remove everything but file lines
  v/^-/d
  " remove lines that don't end with .001
  v/\.001$/d
  " remove excessive ls information
  g/./normal 8daW
  " prepend lxsplit command
  g/./normal Ilxsplit -j "
  " complete quotation mark
  g/./normal A"
  " output
  write! /tmp/vim-gen-betterlxsplitjoin.fish
  " quit
  q!
endfunction

